#INITIAL WRANGLING:
#Read in data and update to lower case:
willamette_fish_passage <- read_csv(here("data", "willamette_fish_passage.csv"))%>%
clean_names()
#Mutate date to class "Date" and convert data to time series data frame (tsibble):
willamette_ts <- willamette_fish_passage %>%
mutate(date = mdy(date)) %>%
as_tsibble(key = NULL, index = date)
Willamette Falls in June 2012. | Credit: Peggy Sigler
This “Overview” section (above the tabs) should contain, in whatever order you choose:
An engaging image (with caption, including photo credit) that is relevant to the dataset
A brief summary (3 - 4 sentences) of the dataset, and what is included in this “report”
A map of the fish ladder location (you can make this in R on your own, or include an existing map appropriately licensed, with attribution)
A professionally formatted data citation
Remember: All code that you used to wrangle the data and prepare the graphs should be available to see if we click on the Code buttons.
# Read in data
fish_data <- read_csv(here("data", "willamette_fish_passage.csv")) %>%
clean_names()
# Select for coho, jack coho and steelhead
fish_clean <- fish_data %>%
select("date", "steelhead", "coho", "jack_coho") %>%
mutate(across(where(is.numeric), ~ ifelse(is.na(.), 0, .))) %>%
mutate(date = mdy(date)) %>%
mutate(year = year(date))
# Wrangle data in preparation for time series
fish_ts <- fish_clean %>%
mutate(yearmonth = yearmonth(date)) %>%
as_tibble(key = NULL, index = yearmonth)
# Steelhead salmon
ggplot(data = fish_ts, aes(x = date, y = steelhead, color = steelhead)) +
geom_line(color = "palegreen4") +
theme_minimal() +
labs(x = "Year", y = "Steelhead Salmon", title = "Steelhead Salmon Passage over Time")
Figure 1: This graph shows that trend in steelhead salmon migration through the Columbia River and gives projections to 2031.
# Coho slamon
ggplot(data = fish_ts, aes(x = date, y = coho, color = coho)) +
geom_line(color = "red3") +
theme_minimal() +
labs(x = "Year", y = "Coho Salmon", title = "Coho Salmon Passage over Time")
Figure 2: This graph shows that trend in coho salmon migration through the Columbia River and gives projections to 2031.
# Jack Coho salmon
ggplot(data = fish_ts, aes(x = date, y = jack_coho, color = jack_coho)) +
geom_line(color = "orange1") +
theme_minimal()+
labs(x = "Year", y = "Jack Coho Salmon", title = "Jack Coho Salmon Passage over Time")
Figure 3: This graph shows that trend in jack coho salmon migration through the Columbia River and gives projections to 2031.
From the times series graphs on steelhead, coho and jack coho salmon, we can see that:
All three types of salmon pass have strong, seasonal migratory patterns through the Columbia River.
Steelhead salmon numbers have remained relatively constant and are predicted to remain constant through 2030 while coho and jack coho salmon numbers are expected to increase.
Steelhead salmon spend a greater time on average in the Columbia River than do either of the other two species.
willamette_long <- willamette_ts %>%
pivot_longer(cols = chinook_run:pink,
names_to = "species",
values_to = "counts") %>%
filter(species %in% c("coho", "jack_coho", "steelhead"))
coho_season <- willamette_long %>%
filter(species == "coho") %>%
gg_season(y = counts,
period = "year",
show.legend = FALSE)+
ylim(0,1000)+
theme_minimal()+
labs(x= "", y = "", title = "Coho")
#coho_season
jack_coho_season <- willamette_long %>%
filter(species == "jack_coho") %>%
gg_season(y = counts,
period = "year")+
theme_minimal()+
ylim(0,1000)+
labs(x= "",
y = "Number of Observations", title = "Jack-Coho")
#jack_coho_season
steelhead_season <- willamette_long %>%
filter(species == "steelhead") %>%
gg_season(y = counts,
period = "year",
show.legend = FALSE)+
theme_minimal()+
ylim(0,1000)+
labs(x= "Month", y = "", title = "Steelhead")
#steelhead_season
# compound_season <- willamette_long %>%
# gg_season(y = counts,
# period = "year")+
# facet_wrap(~species)+
# theme_minimal()
#
# compound_season
patch_season <- (coho_season/jack_coho_season/steelhead_season)+
plot_annotation(title = "Coho, Jack-Coho, and Steelhead Seasonal Abundance in Willamette Falls \nfrom 2001-2010",
caption = "Here abundance of Coho, Jack-Coho and Steelhead seasonally observed in at Willamette Falls fish ladder \nWillamette, Oregon is displayed. These observations range from 2001-2010.Year is indicated by color.")
patch_season
willamette_fish_annual <- willamette_fish_passage %>%
mutate(date = mdy(date)) %>%
mutate(date_year = year(date))
coho_annual <- willamette_fish_annual %>%
count(date_year, wt = coho)
jack_coho_annual <- willamette_fish_annual %>%
count(date_year, wt = jack_coho)
steelhead_annual <- willamette_fish_annual %>%
count(date_year, wt = steelhead)
ggplot()+
geom_line(data = coho_annual, aes(x = date_year, y = n, color = "Coho"), size = 0.7) +
geom_line(data = jack_coho_annual, aes(x = date_year, y = n, color = "Jack Coho"), size = 0.7) +
geom_line(data = steelhead_annual, aes(x = date_year, y = n, color = "Steelhead"), size = 0.7) +
scale_x_continuous(breaks=c(2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010), limits = c(2001,2010)) +
scale_color_manual(values = c( "Coho" = "red3", "Jack Coho" = "orange1", "Steelhead" = "palegreen4"))+
labs(color = "Species")+
scale_y_continuous(labels = scales::label_number_si())+
labs(x = "Year",
y = "Counts",
title = "Annual counts by Species, Willamette Falls (2001-2010)") +
theme_minimal()
Figure 1. Annual counts by species at the Willamette Falls fish ladder, Willamette River, Oregon (2001-2010). Red, orange, and green lines indicate counts for the species coho, jack coho, and steelhead, respectively. Data: Columbia River DART (Data Access in Real Time).
Summary
Annual counts of coho, jack coho, and steelhead species on the Willamette Falls fish ladder (2001-2010) show the following major trends:
● An overall low number of the jack coho species for the entire time period 2001-2010
● A marked increase in the counts of individuals of the coho species for the years 2009-2010
● A high number of individuals of the steelhead species for the period 2001-2004 followed by a relative decrease in the years 2005-2009 and a recent increase in the year 2010